package mips.instructions;

public class Opcodes {

	public static final int SPECIAL	= 0x00;
	public static final int REGIMM	= 0x01;	
	
	// special type
	public static final int SLL		= 0x00;
	public static final int SRL		= 0x02;
	public static final int SRA		= 0x03;
	public static final int SLLV	= 0x04;
	public static final int SRLV	= 0x06;
	public static final int SRAV	= 0x07;
	public static final int JR		= 0x08;
	public static final int JALR	= 0x09;
	public static final int SYSCALL	= 0x0C;
	public static final int BREAK	= 0x0D;
	public static final int SYNC	= 0x0F;
	public static final int MFHI	= 0x10;
	public static final int MTHI	= 0x11;
	public static final int MFLO	= 0x12;
	public static final int MTLO	= 0x13;
	public static final int DSLLV	= 0x14; // UNDEFINED IN 32bit
	public static final int DSRLV	= 0x16; // UNDEFINED IN 32bit
	public static final int DSRAV	= 0x17; // UNDEFINED IN 32bit	
	public static final int MULT	= 0x18;
	public static final int MULTU	= 0x19;
	public static final int DIV		= 0x1A;
	public static final int DIVU	= 0x1B;
	public static final int DMULT	= 0x1C; // UNDEFINED IN 32bit
	public static final int DMULTU	= 0x1D; // UNDEFINED IN 32bit	
	public static final int DDIV	= 0x1E; // UNDEFINED IN 32bit
	public static final int DDIVU	= 0x1F; // UNDEFINED IN 32bit	
	public static final int ADD		= 0x20;
	public static final int ADDU	= 0x21;
	public static final int SUB		= 0x22;
	public static final int SUBU	= 0x23;
	public static final int AND		= 0x24;
	public static final int OR		= 0x25;
	public static final int XOR		= 0x26;
	public static final int NOR		= 0x27;
	public static final int SLT		= 0x2A;
	public static final int STLU	= 0x2B;
	public static final int DADD	= 0x2C; // UNDEFINED IN 32bit
	public static final int DADDU	= 0x2D; // UNDEFINED IN 32bit
	public static final int DSUB	= 0x2E; // UNDEFINED IN 32bit
	public static final int DSUBU	= 0x2F; // UNDEFINED IN 32bit
	public static final int TGE		= 0x30;
	public static final int TGEU	= 0x31;
	public static final int TLT		= 0x32;
	public static final int TLTU	= 0x33;
	public static final int TEQ		= 0x34;
	public static final int TNE		= 0x36;
	public static final int DSLL	= 0x38; // UNDEFINED IN 32bit
	public static final int DSRL	= 0x3A; // UNDEFINED IN 32bit
	public static final int DSRA	= 0x3B; // UNDEFINED IN 32bit
	public static final int DSLL32	= 0x3C; // UNDEFINED IN 32bit
	public static final int DSRL32	= 0x3E; // UNDEFINED IN 32bit
	public static final int DSRA32	= 0x3F; // UNDEFINED IN 32bit
	

	// immediate 
	
	// bltz, bltzal, bltzall, bltzl,  bgez, bgezal, bgezall, bgezl, 
	// teqi, tgei, tgeiu, tlti, tltiu, tnei
	public static final int B		= 0x01; 
	
	public static final int J		= 0x02;
	public static final int JAL		= 0x03;
	public static final int	BEQ		= 0x04;
	public static final int	BNE		= 0x05;
	public static final int	BLEZ	= 0x06;	
	public static final int	BGTZ	= 0x07;
	public static final int	ADDI	= 0x08;
	public static final int ADDIU	= 0x09;
	public static final int SLTI	= 0x0A;
	public static final int STLIU	= 0x0B;
	public static final int ANDI	= 0x0C;
	public static final int ORI		= 0x0D;
	public static final int XORI	= 0x0E;
	public static final int	LUI		= 0x0F;

	// BC0F, BC0FL, BC0T, BC0TL, CFC0, COP0, CTC0, DMFC0, DMTC0, 
	// ERET, MFC0, MTC0, RFE, TLBP, TLBR, TLBWI, TLBWR, 
	public static final int COP0	= 0x10; 

	// BC1F, BC1FL, BC1T, BC1TL, CFC1, COP1, CTC1, MFC1, MTC1	
	public static final int COP1	= 0x11;	
	
	// BC2F, BC2FL, BC2T, BC2TL, CFC2, COP2, CTC2	
	public static final int COP2	= 0x12; 
	
	public static final int BEQL	= 0x14;
	public static final int BNEL	= 0x15;
	public static final int BLEZL	= 0x16;	
	public static final int BGTZL	= 0x17;
	public static final int DADDI	= 0x18; // UNDEFINED IN 32bit
	public static final int DADDIU	= 0x19; // UNDEFINED IN 32bit
	public static final int LDL		= 0x1A; // UNDEFINED IN 32bit
	public static final int LDR		= 0x1B; // UNDEFINED IN 32bit
	public static final int LB		= 0x20;
	public static final int LH		= 0x21;
	public static final int LWL		= 0x22;
	public static final int LW		= 0x23;
	public static final int LBU		= 0x24;
	public static final int LHU		= 0x25;
	public static final int	LWR		= 0x26;
	public static final int LWU		= 0x27;
	public static final int SB		= 0x28;
	public static final int SH		= 0x29;
	public static final int SWL		= 0x2A;
	public static final int SW		= 0x2B;
	public static final int SDL		= 0x2C; // UNDEFINED in 32bit
	public static final int SDR		= 0x2D; // UNDEFINED in 32bit
	public static final int SWR		= 0x2E;
	public static final int CACHE	= 0x2F;
	public static final int LL		= 0x30;
	public static final int LWC1	= 0x31;
	public static final int LWC2	= 0x32;
	public static final int LLD		= 0x34; // UNDEFINED IN 32bit
	public static final int LDC1	= 0x35; // UNDEFINED IN 32bit
	public static final int LDC2	= 0x36; // UNDEFINED IN 32bit
	public static final int LD		= 0x37; // UNDEFINED IN 32bit
	public static final int SC		= 0x38;
	public static final int SWC1	= 0x39;
	public static final int SWC2	= 0x3A;
	public static final int SCD		= 0x3C; // UNDEFINED in 32bit
	public static final int SDC1	= 0x3D; // UNDEFINED in 32bit
	public static final int SDC2	= 0x3E;	// UNDEFINED in 32bit
	public static final int SD		= 0x3F;	// UNDEFINED in 32bit
	
}
